namespace Bread.Utility;

public struct SizeD
{
    public double Width;

    public double Height;

    public double W => Width;

    public double H => Height;

    public static SizeD Empty { get; } = new(0, 0);

    public SizeD(double w, double h)
    {
        Width = w;
        Height = h;
    }

    public SizeN ToSizeN()
    {
        return new SizeN((int)Width, (int)Height);
    }
}

public struct SizeN
{
    public int Width;

    public int Height;

    public int W => Width;

    public int H => Height;

    public bool IsEmpty => Width == 0 || Height == 0;

    public static SizeN Empty { get; } = new(0, 0);

    public SizeN(int w, int h)
    {
        Width = w;
        Height = h;
    }

    public SizeD ToSizeD()
    {
        return new SizeD(Width, Height);
    }
}

